<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>mymsgro</title>
	<link rel="stylesheet" type="text/css" href="css/main.css" />
	<link rel="stylesheet" type="text/css" href="css/meniu.css" />
	<link rel="stylesheet" type="text/css" href="css/style.css" />

</h:head>
<h:body>

	<ui:include src="header.xhtml" />

	<h:panelGroup layout="block" id="content">

		<ui:include src="leftMenu.xhtml" />

		<h:panelGroup layout="block" id="contenRight">
	<f:event type="preRenderView" listener="#{employeeBean.preRenderView}"/>
			<h:panelGroup layout="block" id="header" style="margin-top: 20px;">
				<ul>
					<li id="selected"><a>Add employee</a></li>
				</ul>
			</h:panelGroup>
			<h:panelGroup layout="block" id="contentTab">
				<h:form id="formAddUser" enctype="multipart/form-data">
					<h:panelGrid columns="2">
						<h:outputText id="generalCheckbox" value="Send Mail to new Users"></h:outputText>
						<h:selectBooleanCheckbox value="#{employeeBean.sendEmail}">
							<p:ajax event="change" listener="#{employeeBean.sendEmail}"
								update="generalCheckbox"></p:ajax>
						</h:selectBooleanCheckbox>
					</h:panelGrid>
					
					<h:panelGrid columns="2">
						<p:fileUpload
							fileUploadListener="#{employeeBean.handleFileUpload}"
							mode="advanced" dragDropSupport="false" update="@all"
							sizeLimit="100000" fileLimit="3"
							allowTypes="/(\.|\/)(gif|jpe?g|png|csv)$/" />
						<p:growl id="messages" showDetail="true" />
					</h:panelGrid>
				</h:form>

				<h:panelGroup layout="block" rendered="#{employeeBean.counter != 0}">
					<h:panelGrid columns="2">
						<h:outputText value="#{employeeBean.errorMessage}">
						</h:outputText>
						<h:outputText></h:outputText>

						<h:outputText value="Added: "></h:outputText>
						<h:outputText value="#{employeeBean.counter}"></h:outputText>
					</h:panelGrid>

				</h:panelGroup>
			</h:panelGroup>


		</h:panelGroup>

	</h:panelGroup>
</h:body>
</html>